package com.CNMedical.web.controller.system.applet;

import com.CNMedical.common.annotation.Anonymous;
import com.CNMedical.common.core.controller.BaseController;
import com.CNMedical.common.core.domain.R;
import com.CNMedical.system.domain.entity.AppletRotation;
import com.CNMedical.system.service.IAppletRotationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * 轮播图Controller
 *
 * @author tang
 * @date 2023-03-29
 */
@Api(tags = "轮播图接口")
@Anonymous
@RestController
@RequestMapping("/applet/rotation")
public class RotationController extends BaseController {


    @Resource
    private IAppletRotationService iAppletRotationService;

    /**
     * 轮播图
     *
     * @date 2023-03-29
     */
    @ApiOperation("轮播图")
    @GetMapping("/getRotation")
    public R<List<AppletRotation>> getH5MyPostList() {
        List<AppletRotation> allRotation = iAppletRotationService.getAllRotation();
        return R.ok(allRotation);
    }
}
